<%--
功能: 日期选择控件
--%>
<%@ tag body-content="empty"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ attribute name="outPut" required="true" type="java.lang.String" description="目标field ID"%>
<%@ attribute name="isHideIcon" required="false" type="java.lang.Boolean" description="是否隐藏日期按钮小图标，默认false"%>
<c:set var="ui_datepicker" value="true" scope="request"/>
<script type="text/javascript">
$j(document).ready(function(){
	$j('#${outPut}').datepicker({
		<c:choose>
			<c:when test="${isHideIcon == true}">
				showOn: 'both', 
			</c:when>
			<c:otherwise>
				showOn: 'button', 
			</c:otherwise>
		</c:choose>
		showOtherMonths: true, 
		showWeeks: true, 
		firstDay: 1, 
		changeFirstDay: false,
		closeAtTop:false,
		onClose: function(date) {validateField($("${outPut}"));},		
		buttonImageOnly: true,
		buttonImage: '${ctxPath}/scripts/jquery-ui/themes/default/images/calendar.gif'
	});
	<c:if test="${isHideIcon == true}">
		$j('#${outPut}').next().hide();
	</c:if>
});
</script>
